From: Keir Fraser Date: Sun, 16 Aug 2009 07:45:04 +0000 (+0100) Subject: stubdoms: parse bridge informations X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13472 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=5d9367d05919b253227a6db1758dee7064077d12;p=xen.git stubdoms: parse bridge informations Currently the stubdom-dm script doesn't read the bridge of a vif on xenstore, therefore all the vifs assigned to the stubdom always belong to default bridge. This patch changes the behavior reading the bridge from xenstore and adding the bridge to the stubdom config file. Signed-off-by: Stefano Stabellini --- diff --git a/stubdom/stubdom-dm b/stubdom/stubdom-dm index 8faca31843..b76dab278b 100644 --- a/stubdom/stubdom-dm +++ b/stubdom/stubdom-dm @@ -143,11 +143,18 @@ do i=${i%\"} i=${i#\"} vif_mac=`xenstore-read $i/mac` + vif_bridge=`xenstore-read $i/bridge` if [ $j -ne 0 ] then echo -n "," >> ${stubdom_configdir}/$domname-dm fi - echo -n "'mac=$vif_mac'" >> ${stubdom_configdir}/$domname-dm + echo -n "'mac=$vif_mac" >> ${stubdom_configdir}/$domname-dm + if [ "$vif_bridge" ] + then + echo -n ",bridge=$vif_bridge'" >> ${stubdom_configdir}/$domname-dm + else + echo -n "'" >> ${stubdom_configdir}/$domname-dm + fi j=$(( $j + 1 )) done echo " ] " >> ${stubdom_configdir}/$domname-dm